import { request } from "@/utils/service"
import type * as VipUser from "./types/vipUser"

/** 增 */
export function createVipUserDataApi(data: VipUser.CreateOrUpdateVipUserRequestData) {
  return request({
    url: "member/apply",
    method: "post",
    data
  })
}

/** 删 */
export function deleteVipUserDataApi(ids: string) {
  return request({
    url: `member/apply/batch?ids=${ids}`,
    method: "delete"
  })
}

// /** 改 */
export function updateVipUserDataApi(data: VipUser.CreateOrUpdateVipUserRequestData) {
  return request({
    url: "member/apply",
    method: "put",
    data
  })
}

/** 查 */
export function getVipUserDataApi(params: VipUser.GetVipUserRequestData) {
  return request<VipUser.GetVipUserResponseData>({
    url: "member/apply",
    method: "get",
    params
  })
}
